Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add format options for ansible-galaxy collection list #73474

Merged
merged 16 commits into from Feb 5, 2021

Conversation

shanemcd
Copy link
Member

@shanemcd shanemcd commented Feb 4, 2021

SUMMARY
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible-galaxy

ADDITIONAL INFORMATION

This would be useful for an upcoming feature in AWX/Tower.

@ansibot ansibot added affects_2.11 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 4, 2021
@samdoran samdoran self-requested a review February 4, 2021 02:09
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 4, 2021
Copy link
Contributor

@jborean93 jborean93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the idea, we just need a changelog fragment and integration test for this. You can find the current tests at https://github.com/ansible/ansible/blob/devel/test/integration/targets/ansible-galaxy-collection/tasks/list.yml.

lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 4, 2021
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs integration tests + some structural improvements:

lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
lib/ansible/cli/galaxy.py Outdated Show resolved Hide resolved
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 4, 2021
@shanemcd
Copy link
Member Author

shanemcd commented Feb 4, 2021

@jborean93 @webknjaz I have addressed the majority of your feedback. However, I have been unsuccessful at getting the integration tests to work on my machine, so I cannot add a new one.

Using the command:

bin/ansible-test integration ansible-galaxy-collection -v

I see the error:

TASK [ansible-galaxy-collection : install simple collection with implicit path - galaxy_ng] **************************************************************************************************************
fatal: [testhost]: FAILED! => {"changed": true, "cmd": ["ansible-galaxy", "collection", "install", "namespace1.name1", "-s", "galaxy_ng", "-v"], "delta": "0:00:01.617742", "end": "2021-02-04 10:04:31.690424", "msg": "non-zero return code", "rc": 1, "start": "2021-02-04 10:04:30.072682", "stderr": "\u001b[0;31mERROR! Failed to download collection tar from 'galaxy_ng': <urlopen error [Errno -2] Name or service not known>\u001b[0m", "stderr_lines": ["\u001b[0;31mERROR! Failed to download collection tar from 'galaxy_ng': <urlopen error [Errno -2] Name or service not known>\u001b[0m"], "stdout": "\u001b[0;34mUsing /tmp/ansible.xmzexh7v.test/galaxy/ansible.cfg as config file\u001b[0m\nStarting galaxy collection install process\nProcess install dependency map\nStarting collection install process\nDownloading http://ansible-ci-pulp:80/pulp/content/published/namespace1-name1-1.0.9.tar.gz to /home/shanemcd/.ansible/tmp/ansible-local-139077gi10ktw5/tmpr1mb62q0/namespace1-name1-1.0.9-aer09auq", "stdout_lines": ["\u001b[0;34mUsing /tmp/ansible.xmzexh7v.test/galaxy/ansible.cfg as config file\u001b[0m", "Starting galaxy collection install process", "Process install dependency map", "Starting collection install process", "Downloading http://ansible-ci-pulp:80/pulp/content/published/namespace1-name1-1.0.9.tar.gz to /home/shanemcd/.ansible/tmp/ansible-local-139077gi10ktw5/tmpr1mb62q0/namespace1-name1-1.0.9-aer09auq"]}

I spent about an hour trying to figure this out and had 0 luck.

@s-hertel
Copy link
Contributor

s-hertel commented Feb 4, 2021

These integration tests need to be run with --docker

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 4, 2021
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Feb 4, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 4, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 5, 2021
@shanemcd
Copy link
Member Author

shanemcd commented Feb 5, 2021

Almost LGTM: I have a few final comments below.

Also, could you please add tests with explicit ansible-galaxy collection list -o human? I believe I've only seen an implicit one.

This is done.

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 5, 2021
lib/ansible/cli/galaxy.py Show resolved Hide resolved
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 5, 2021
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. labels Feb 5, 2021
@shanemcd
Copy link
Member Author

shanemcd commented Feb 5, 2021

Quick, someone push the button before I break the CI again!

@samdoran samdoran merged commit 67f5bb3 into ansible:devel Feb 5, 2021
@ansible ansible locked and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.11 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. has_issue support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants